<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.prime.com.tr/ui" template="./template.xhtml">

    <ui:define name="screen">

        <h:form prependId="false" >
            <p:growl id="growl" />
            <p:focus /> 

            <p:panel header="Login" >

                <h:panelGrid columns="1" id="grid">

                    <h:outputLabel for="email" value="E-mail" />
                    <p:inputText id="email"
                                 value="#{autenticacaoAction.autenticacaoVo.usuarioVo.email}" />
                    <p:message for="email" />


                    <h:outputLabel for="senha" value="Senha" />
                    <p:password id="senha" feedback="false"
                                value="#{autenticacaoAction.autenticacaoVo.usuarioVo.senha}" />
                    <p:message for="senha" display="icon" />

                </h:panelGrid>
                
                <p:commandButton value="Acessar" image="ui-icon ui-icon-key" title="Acessar" ajax="false" update="grid, growl" 
                             action="#{autenticacaoAction.acessar}" />
                
                <p:commandButton image="ui-icon ui-icon-refresh" title="Limpar" update="grid"  tabindex="-1"
                             action="#{autenticacaoAction.limpar}" />

            </p:panel>
            
            <p:commandButton value="Cadastrar-se" image="ui-icon ui-icon-person" title="Cadastrar-se" ajax="false"
                             action="cadastroConta" />

        </h:form>

    </ui:define>

</ui:composition>